Persistent Homology Algorithm: An Example